package com.raccoonagents.tools.cascet2d.model;

import com.raccoonagents.tools.cascet2d.interfaces.IStateController;

/**
 * A Controller superclass
 * @author jabi
 *
 */
public abstract class AStateController implements IStateController{

	public AppState root;
	
	
	public final void startStates(){
		root.activate();
	}
	
	
	public abstract void update(AppState state, final long dt);
	
	public abstract void onStart(AppState state);

	public abstract void onEnd(AppState state);
	
	public void resetStates(){
		root.reset();
	}
	
	public final void updateState(final long dt) {
		root.update(dt);		
	}
	
}
